﻿namespace ExcelAutomator.Validation
{
	public class IoValidation 
	{
		private readonly ValidationEngine m_ValidationEngine;

		public IoValidation(ValidationEngine validationEngine)
		{
			m_ValidationEngine = validationEngine;
		}

		public FileValidator File(string fullFileName)
		{
			var fileValidator = new FileValidator(fullFileName);
			m_ValidationEngine.Add(fileValidator);
			return fileValidator;
		}

		public DirectoryValidator Directory(string dirPath)
		{
			var dirValidator = new DirectoryValidator(dirPath);
			m_ValidationEngine.Add(dirValidator);
			return dirValidator;
		}

//		public IoValidation DirectoryOrFileExists()
//		{
//			if (!File.Exists(m_Uri) && !Directory.Exists(m_Uri))
//			{
//				SetFailure(string.Format("The file or directory '{0}' doesn't exists.", m_Uri));
//			}
//			return this;
//		}

		

	}
}
